{% extends "base.html" %}

{% from 'lenta/lenta/macros.jinja' import view_lenta_link %}
{% from 'lenta/lenta/macros.jinja' import view_lenta_href %}
{% from 'lenta/lenta/macros.jinja' import edit_lenta_link %}
{% from 'lenta/lenta/macros.jinja' import edit_lenta_href %}
{% from 'lenta/lenta/macros.jinja' import delete_lenta_link %}
{% from 'lenta/lenta/macros.jinja' import lenta_info_href %}
{% from 'lenta/lenta/macros.jinja' import lenta_all_tags_href %}
{% from 'lenta/lenta/macros.jinja' import lenta_form %}

{% from 'lenta/note/macros.jinja' import view_note_href %}
{% from 'lenta/note/macros.jinja' import edit_note_href %}
{% from 'lenta/note/macros.jinja' import delete_note_link %}
{% from 'lenta/note/macros.jinja' import add_note_href %}
{% from 'lenta/note/macros.jinja' import notes_short_info_roll %}
{% from 'lenta/note/macros.jinja' import note_form %}

{% from 'lenta/tag/macros.jinja' import view_tag_link %}
{% from 'lenta/tag/macros.jinja' import view_tag_href %}
{% from 'lenta/tag/macros.jinja' import edit_tag_link %}
{% from 'lenta/tag/macros.jinja' import edit_tag_href %}
{% from 'lenta/tag/macros.jinja' import delete_tag_link %}

{% from 'lenta/macros.jinja' import notes_by_tag_href %}


{% block external_styles %}

    {{ super() }}

    <link rel="stylesheet" type="text/css" href="/static/lenta/styles/base.css">    

{% endblock external_styles %}


{% block inline_style_block %}

	{{ super() }}

	#caption {
		display: inline-block;
		margin: 0 0 5px 30px;
		padding: 4px 7px 4px 7px;
		background: #FFDF7F;
	}
	
	a.caption {
		color: #121212;
	}
	
{% endblock %}


{% block top_bar_left %}
	<ul>
		<li class="top_bar {{ 'active' if request.path == url_for('root') }}">
		  <a href="{{ url_for('root') }}">2root</a>
		</li>
		<li class="top_bar {{ 'active' if request.path == lenta_info_href(c.lenta) }}">
		  <a href="{{ lenta_info_href(c.lenta) }}">lenta info</a>
		</li>
		<li class="top_bar {{'active' if request.path == add_note_href(c.lenta)}}">
		  <a href="{{ add_note_href(c.lenta) }}">new note</a>
		</li>
	</ul>
{% endblock %}


{% block page_content  %}

    <div id="caption">
    {% block caption %}
        <h2>
          <a href="{{ view_lenta_href(c.lenta) }}" class="caption">{{c.lenta.name}}</a>
        </h2>
    {% endblock caption %}
    </div>

    {% block main_content %}{% endblock %}

{% endblock page_content  %}
